//
// Created by wkm on 2023-12-03.
//

#ifndef MYSYSTEMCLEARNING_SYNC_COUNT4_H
#define MYSYSTEMCLEARNING_SYNC_COUNT4_H

#include "systemc.h"

const int COUNT_BITS = 4;

SC_MODULE(sync_count4) {
    sc_in<bool> mclk, clear, updown;
    sc_in<sc_uint<COUNT_BITS> > data_in;
    sc_out<sc_uint<COUNT_BITS> > data_out;

    void prc_counter();

    SC_CTOR(sync_count4) {
        SC_METHOD(prc_counter);
        sensitive_pos << mclk;  // 只须指定一个时钟的正跳变沿
    }
};

#endif //MYSYSTEMCLEARNING_SYNC_COUNT4_H
